Skip to content

Instantly share code, notes, and snippets.

"""
The most atomic way to train and run inference for a GPT in pure, dependency-free Python.
This file is the complete algorithm.
Everything else is just efficiency.
@karpathy
"""
import os # os.path.exists
import math # math.log, math.exp
@k16shikano
k16shikano / SKILL.md
Last active June 17, 2026 22:46
japanese-tech-writing/SKILL
name japanese-tech-writing
description 日本語の技術文書・書籍原稿の文章規範。整形(一文一行、引用ブロック、脚注、コラム記法)、段落と論証の構成(パラグラフライティング)、論証の厳密さ(ツッコミどころの除去)、読み手の負荷の管理、視点と語り、演出の抑制、LLM っぽい空句の禁止、冗長の排除を定める。日本語で技術書の章、草稿、記事、解説文を書くとき、または推敲・リライトするときに使用する。

日本語技術文書の文章規範

日本語で技術的な原稿(書籍の章、記事、解説文)を書く・推敲するときは、以下の規範に従う。

整形

uniform sampler2D swapTexture;
uniform bool shaderIsActive;
void main()
{
vec4 pixel = texture2D(bitmap, openfl_TextureCoordv);
if (!shaderIsActive)
{
gl_FragColor = pixel;
package effects;
import openfl.display.BitmapData;
import flixel.util.FlxColor;
import flixel.system.FlxAssets.FlxShader;
/**
* https://gamedevelopment.tutsplus.com/tutorials/how-to-use-a-shader-to-dynamically-swap-a-sprites-colors--cms-25129
* https://github.com/HaxeFlixel/flixel-demos/blob/master/Effects/BlendModeShaders/source/openfl8/effects/ColorSwapEffect.hx
* https://community.openfl.org/t/passing-an-array-as-parameter-to-shader/9932/9
@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active June 17, 2026 22:37
Complete Recent Discord Quest

Caution

As of April 7th 2026, Discord has expressed their intent to crack down on automating quest completion.

Some users have received the following system message:

image

There isn't much I can do to make the script undetected, so use it at your own risk, as you most likely WILL get flagged by doing so.

Complete Recent Discord Quest

@jesussuarz
jesussuarz / Reinstall cPanel-WHM on Ubuntu After a Failed Installation - Without Reformatting the Server.md
Last active June 17, 2026 22:35
Reinstall cPanel/WHM on Ubuntu After a Failed Installation (Without Reformatting the Server)

Reinstall cPanel/WHM on Ubuntu After a Failed Installation (Without Reformatting the Server)

cPanel does not provide an official uninstaller. If a cPanel installation fails, the usual recommendation is to reinstall the entire server.

However, it is possible to clean the existing installation and reinstall cPanel without formatting the server.

This guide explains how to remove the broken installation and perform a fresh install.

⚠️ Warning:
This process removes cPanel, MySQL/MariaDB, and all related data. Only use it on servers where data loss is acceptable or backups exist.

LLM Wiki

A pattern for building personal knowledge bases using LLMs.

This is an idea file, it is designed to be copy pasted to your own LLM Agent (e.g. OpenAI Codex, Claude Code, OpenCode / Pi, or etc.). Its goal is to communicate the high level idea, but your agent will build out the specifics in collaboration with you.

The core idea

Most people's experience with LLMs and documents looks like RAG: you upload a collection of files, the LLM retrieves relevant chunks at query time, and generates an answer. This works, but the LLM is rediscovering knowledge from scratch on every question. There's no accumulation. Ask a subtle question that requires synthesizing five documents, and the LLM has to find and piece together the relevant fragments every time. Nothing is built up. NotebookLM, ChatGPT file uploads, and most RAG systems work this way.

@joshenders
joshenders / tailscale_udp_optimization.md
Last active June 17, 2026 22:26
How to improve tailscale throughput via transport layer offloading in OpenWrt 24.10

How to improve tailscale throughput via transport layer offloading in OpenWrt 24.10

Tailscale version 1.54 or later used with OpenWrt 24.10 or later (which uses kernel 6.6) enables UDP throughput improvements via transport layer offloading.

Namely, tuning two features may show improved throughput:

  • rx-udp-gro-forwarding: Enables UDP Generic Receive Offload (GRO) forwarding, which aggregates incoming UDP packets to reduce CPU overhead on receive.
  • rx-gro-list: If disabled (off), it prevents multiple flows from being aggregated simultaneously which simplifies flow handling and performance on some workloads.

[!NOTE]